﻿@model TaskManager.Developer
@{
    Layout = null;
}

<div style="margin: 5px 5px 5px 5px;">
    <a id="saveButton" class="k-button" href="#">Save</a>
</div>

<form id="developerForm">
    @Html.HiddenFor(m => m.DeveloperId)

    <fieldset><legend>Developer</legend>
        Client-side Validation:
        <ul>
            <li>Either the First Name or the Last Name must be entered.  Try removing both to see the custom validation rule applied.</li>
            <li>Title is required.  Try removing the Title to see what happens.</li>
            <li>The validation rules are applied when attempting to save.  Try saving when there are validation errors.</li>
        </ul>
        <div class="tm-field" style="width:100px;">@Html.LabelFor(m => m.FirstName)</div><div class="tm-field">@Html.TextBoxFor(m => m.FirstName)</div>
        <div class="tm-field" style="width:20px;">&nbsp;</div>
        <div class="tm-field" style="width:100px;">@Html.LabelFor(m => m.LastName)</div><div class="tm-field">@Html.TextBoxFor(m => m.LastName)</div><br />

        <div class="tm-field" style="width:100px;margin-top:5px;">@Html.LabelFor(m => m.Title)</div><div class="tm-field">@Html.TextBoxFor(m => m.Title, new { required = "required" })</div>
    </fieldset>
</form>

<fieldset><legend>Tasks</legend>
    <div id="taskGrid"></div>
</form>

<div id="messageWindow"></div>

<script src="@Url.Content("~/Scripts/Developer.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        Developer.init();
    });
</script>